#include "cstring"
#include "iostream"

using namespace std;

void stringPointerOperation(char* str, char* firstPtr, char* secondPtr);

int main(){
  char *str;
  str= new char[5];
  cout << "Please enter your (5) char!"<< endl;
  for (int i=0;i<5;i++)
    {
      cin >> str[i];
    }

  stringPointerOperation(str, &str[0], &str[4]);
  delete[] str;
  return 0;
}

void stringPointerOperation(char* str, char* firstPtr, char* secondPtr){
  cout << str << endl;
  cout << "First character=" << *firstPtr << endl;
  cout << "Second character =" << *secondPtr << endl;

  cout << "From the first char to the end " << firstPtr << endl;

  int number = (secondPtr-firstPtr)/(sizeof(char));
  cout << "The number of chars is " << number <<endl;
}
